﻿<html>
<head>
</head>
<body>
<div class="file_manager d-flex flex-column">
    <div id="uploader" class="p-1">
        <div class="d-flex">
            <div class="flex-grow-1 mr-1">
                <div class="input-group" role="group">
                    <div class="input-group-prepend">
                        <button name="home" type="button" value="Home" title="{{ _('Home') }}" class="btn btn-primary-icon home"
                                tabindex="0" aria-label="home">
                            <span class="fa fa-home sql-icon-lg"></span>
                        </button>
                        <button name="level-up" type="button" title="{{ _('Back') }}" value="LevelUp" class="btn btn-primary-icon level-up"
                                disabled tabindex="0" aria-label="level up">
                            <span class="fa fa-level-up-alt sql-icon-lg"></span>
                        </button>
                    </div>
                    <input id="file-input-path" class="form-control input-path text-truncate" title="" type="text" tabindex="0" autofocus/>
                </div>
                <div class="uploadresponse"></div>
            </div>
            <div>
                <input class="mode" name="mode" type="hidden" value="add"/>
                <input class="currentpath" name="currentpath" type="hidden"/>
                <button type="button" title="{{ _('Refresh') }}" class="btn btn-sm btn-primary-icon refresh"
                        tabindex="0" aria-label="refresh" id="refresh_list">
                    <span class="fa fa-sync-alt sql-icon-lg"></span>
                </button>
                <button type="button" title="{{ _('Download File') }}" class="btn btn-sm btn-primary-icon download"
                        disabled aria-label="Download File">
                    <span class="fa fa-download sql-icon-lg"></span>
                </button>
                <button name="delete" type="button" title="{{ _('Delete File/Folder') }}" class="btn btn-sm btn-primary-icon delete"
                        disabled aria-label="delete">
                    <span class="fa fa-trash-alt sql-icon-lg"></span>
                </button>
                <button name="rename" type="button" title="{{ _('Rename File/Folder') }}" class="btn btn-sm btn-primary-icon rename"
                        tabindex="0" aria-label="rename">
                    <span class="fa fa-edit sql-icon-lg"></span>
                </button>
                <button name="newfolder" type="button" title="{{ _('Create new folder') }}" value="New Folder"
                        class="btn btn-sm btn-primary-icon create" tabindex="0" aria-label="newfolder">
                    <span class="fa fa-folder-open sql-icon-lg"></span>
                    <span class="fa fa-plus add-folder-icon"></span>
                </button>
                <div class="btn-group" role="group">
                    <button class="ON btn btn-primary-icon btn-sm grid" type="button" title="{{ _('View as grid') }}" tabindex="0" aria-label="View as grid">
                        <span class="fa fa-th sql-icon-lg"></span>
                    </button>
                    <button type="button" class="btn btn-primary-icon btn-sm list" title="{{ _('View as table') }}" tabindex="0" aria-label="View as table">
                        <span class="fa fa-list sql-icon-lg"></span>
                    </button>
                </div>
            </div>
        </div>
    </div>
    <div class="fileinfo flex-grow-1 d-flex">
        <span class="activity">
        <img src="{{ url_for('static', filename='js/generated/img/load-root.gif') }}"
            alt="{{ _('Loading...') }}">
        </span>
        <div class="file_listing"></div>
        <div class="upload_file d-none"></div>
        <div class='fm_dimmer'></div>
        <div class='delete_item'>
            <span>{{ _('Are you sure you want to delete this item?') }}</span>
            <span class="pull-right">
                <button type='button' class='btn btn-primary-icon btn_no' tabindex="0">{{ _('No') }}</button>
                <button type='button' class='btn btn-primary btn_yes' tabindex="0">{{ _('Yes') }}</button>
            </span>
        </div>
        <div class='replace_file'>
            <span>{{ _('Are you sure you want to replace this file?') }}</span>
            <span class="pull-right">
                <button type='button' class='btn btn-primary-icon btn_no' tabindex="0">{{ _('No') }}</button>
                <button type='button' class='btn btn-primary btn_yes' tabindex="0">{{ _('Yes') }}</button>
            </span>
        </div>
    </div>
    <div class="allowed_file_types"></div>
    <script>
	require(['sources/generated/file_utils'], function() {
	    pgAdmin.FileUtils.init();
    });
    setTimeout(function(){ $('#file-input-path').focus(); }, 1000);
    </script>
</div>
</body>
</html>
